@semy = 0.25
@third = @[1/3]
@fifth = @[1/5]
@sixth = @[1/6]

@canton_scale_cross_x = @[ ( 333 / 768 ) + 0.001 ]
@canton_scale_cross_y = @[ ( 205 / 512 ) + 0.001 ]

@canton_scale_sweden_x = @[ ( 255 / 768 ) + 0.001 ]
@canton_scale_sweden_y = @[ ( 204 / 512 ) + 0.001 ]

@uru_canton_height = 0.556
@NZL_coa_offset = @[3/16]
@sm_fra = 0.16

ABK = {	#Akkhazia
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_stripes_04.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 1.0 1.0 }	position = { 0.5 0.5 }	rotation = 90	}
	}
}
#ABK_modern = {	#Akkhazia
#	pattern = "pattern_solid.tga"
#	color1 = "white"

#	colored_emblem = {
#		texture = "ce_stripes_07.dds"
#		color1 = "green"
#		color2 = "green"
#		instance = { scale = { 1.0 1.0 }	position = { 0.5 0.5 }	}
#	}
#	colored_emblem = {
#		texture = "ce_solid.dds"
#		color1 = "red"
#		color2 = "red"
#		instance = { scale = { @[2/5] @[3/7] }	position = { @[1/5] @[3/14] }	}
#	}
#	colored_emblem = {
#		texture = "ce_hand.dds"
#		color1 = "white"
#		color2 = "white"
#		instance = { scale = { 0.25 0.25 }	position = { @[1/5] 0.28 }	}
#	}
#	colored_emblem = {
#		texture = "ce_star_05.dds"
#		color1 = "white"
#		color2 = "white"
#		instance = { scale = { 0.08 0.08 }	position = { @[6/100] 0.25 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[10/100] 0.18 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[14.5/100] 0.12 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[1/5] 0.1 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[25.5/100] 0.12 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[30/100] 0.18 }	}
#		instance = { scale = { 0.08 0.08 }	position = { @[34/100] 0.25 }	}
#	}
#}

AKA = {	#Alaska
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.20 0.20 }	position = { 0.8 0.2 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.22 0.45 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.35 0.50 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.4 0.60 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.45 0.70 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.445 0.82 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.6 0.72 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.55 0.85 }	}
	}
}
AKA_russian = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "blue"
		color2 = "blue"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.625 }	}
	}

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.875 }	}
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "blue"
		color2 = "blue"
		instance = { scale = { 0.15 0.15 }	position = { 0.8 0.15 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.22 0.1 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.35 0.15 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.4 0.25 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.45 0.32 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.445 0.42 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.6 0.32 }	}
		instance = { scale = { 0.10 0.10 }	position = { 0.55 0.43 }	}
	}
}

ALD = { # Algeria
	pattern = "pattern_solid.tga"
	color1 = "yellow"

	colored_emblem = {
		texture = "ce_stripes_05.dds"
		color1 = "red_light"
	}
}

ALN = {	# Saxe-Altenburg
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
	}
	textured_emblem = {
		texture = "te_crown.dds"
		instance = { scale = { 0.55 0.55 }	position = { 0.5 0.22 }	}
	}
	colored_emblem = {
		texture = "ce_shield_saxony.dds"
		color1 = "black"
		color2 = "yellow"
		color3 = "green"
		instance = { scale = { 0.55 0.55 }	position = { 0.5 0.52 }	}
	}
}

ANR = {	#Andorra (1836-1866)
	pattern = "pattern_solid.tga"
	color1 = "yellow"

	colored_emblem = {
		texture = "ce_bicolor_right.dds"
		color1 = "red"
	}
}
ANR2 = {	#Andorra (1866-1936)
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "yellow"
		color2 = "red"
	}
}
ANT = {
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "white"

	colored_emblem = {
		texture = "ce_crescent_star_06_pale.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { scale = { 0.9 0.7 }	position = { 0.5 0.6 }	}
	}

}

ATI = { 
	pattern = "pattern_border_of_4.dds"
	color1 = "red"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_soyombo_flame.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.3 0.3 }	position = { 0.5 0.27 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.3 0.3 }	position = { 0.5 0.57 }	}
	}
	colored_emblem = {
		texture = "ce_crescent_star_06_pale.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.5 0.4 }	position = { 0.5 0.67 }	}
	}
}

AUS_republic = {	#Austria
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color1
	}
	sub = {
		parent = "sub_AUS_coa_republic"
	}
}
AUS_dictatorship = {
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"
	color3 = "black"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "red"
	}
	colored_emblem = {
		texture = "ce_eagle_double_headed.dds"
		color1 = "black"
		color2 = "yellow"
		color3 = "white"
		instance = { scale = { 0.85 0.85 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_shield_austria.dds"
		color1 = "red"
		color2 = "white"
		instance = { scale = { 0.23 0.23 }	position = { 0.5 0.49 }	}
	}
}
AUS_theocracy = {
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal_fifth.dds"
		color1 = color2
		color2 = color1
	}
	colored_emblem = {
		texture = "ce_cross_patty.dds"
		color1 = color2
		color2 = color1
		instance = { scale = { 0.4 0.4 }	position = { 0.5 0.25 }	}
	}
}

BAA = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red"
	}

	colored_emblem = {
		texture = "ce_cross_switzerland.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 0.7 0.7 }	position = { 0.5 0.5 }	}
	}
}

BAR = {	# barus
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { @[1/3] 1 }	position = { @[1/6] 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_star_08.dds"
		color1 = "white"
		instance = { scale = { 0.25 0.25 }	position = { 0.5 0.25 }	}
	}
	colored_emblem = {
		texture = "ce_coa_constantine.dds"
		color1 = "white"
		instance = { scale = { 0.5 0.5 }	position = { 0.58 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		instance = { scale = { 0.25 0.25 }	position = { 0.5 0.75 }	}
	}
}

BOL_united = {	#Bolivia
	pattern = "pattern_solid.tga"
	color1 = "red_lighter"

	textured_emblem = {
		texture = "te_coa_peru_bolivia.dds"
		instance = { scale = { 0.72	 0.67 }	position = { 0.5 0.5 }	}
	}
}

BSA = {	# British South Africa
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_bsac_lion.dds"
		color1 = "yellow"
		 color2 = "black"
		 color3 = "white"
		instance = { scale = { 0.8 0.8 }	}
	}
}

BSA_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	textured_emblem = {
		texture = "te_coa_rhodesia_and_nyasaland.dds"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

BSA_subject_lion = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_bsac_lion.dds"
		color1 = "yellow"
		 color2 = "black"
		 color3 = "white"
		instance = { scale = { 0.45 0.45 }	position = { 0.75 0.5 }	}
	}
}

BSA_british = {

	pattern = "pattern_gironny_8.dds"
	color1 = "blue"
	color2 = "blue"
	color3 = "white"
	color4 = "red"

	colored_emblem = {
		texture = "ce_saltire.dds"
		color1 = color3
		color2 = color3
	}
	colored_emblem = {
		texture = "ce_saltire_fimbriated.dds"
		color1 = color3
		color2 = color4
		mask = { 2 }
	}
	colored_emblem = {
		texture = "ce_cross_england_fimbriated.dds"
		color1 = color3
		color2 = color4
	}

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = color4
		color2 = color4
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.7 0.7 }	position = { 0.5 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_bsac_lion.dds"
		color1 = "yellow"
		 color2 = "black"
		 color3 = "white"
		instance = { scale = { 0.2 0.2 }	position = { 0.5 0.45 }	}
	}
	colored_emblem = {
		texture = "ce_bsac_text.dds"
		color1 = "black"
		 color2 = "yellow"
		 color3 = color4
		instance = { scale = { 0.4 0.4 }	position = { 0.49 0.58 }	}
	}
}

CAL_communist = { # California
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 0.65 1.0 }	position = { 0.0 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_hammer_sickle_star_cogwheel.dds"
		color1 = "yellow"
		color2 = "red"
		instance = { scale = { 0.5 0.5 }	position = { 0.165 0.25 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 0.1 0.1 }	position = { 0.17 0.08 }	}
	}
	colored_emblem = {
		texture = "ce_star_05_hollow.dds"
		color1 = "yellow"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.3 0.3 }	position = { 0.65 0.25 }	}
	}
	colored_emblem = {
		texture = "ce_bear_california.dds"
		color1 = "yellow"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.75 0.75 }	position = { 0.65 0.6 }	}
	}
}
CAL_communist_canton = { # California
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"

	colored_emblem = {
		texture = "ce_star_05_hollow.dds"
		color1 = "yellow"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.35 0.35 }	position = { 0.5 0.22 }	}
	}
	colored_emblem = {
		texture = "ce_bear_california.dds"
		color1 = "yellow"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.85 0.85 }	position = { 0.5 0.65 }	}
	}
}

CAU = {	# Caucasus/Caucasian Viceroyalty
	pattern = "pattern_solid.tga"
	color1 = "yellow_light"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "black"
		color2 = "red"
	}

	colored_emblem = {
		texture = "ce_eagle_doubleheaded_russia_claws.dds"
		color1 = "yellow_dark"
		 color2 = "black"
		 color3 = "black"
		instance = { scale = { 0.8 0.8 }	}
	}

	colored_emblem = {
		texture = "ce_eagle_doubleheaded_base.dds"
		color1 = "yellow"
		color2 = "black"
		color3 = "yellow_dark"
		instance = { scale = { 0.85 0.85 }	position = { 0.5 0.5 }	}
	}
}

CHC_imamate = { # Caucasian Imamate
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 0.66 0.2 }	position = { 0.5 0.1 }	}
		instance = { scale = { 0.66 0.2 }	position = { 0.5 0.9 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 2.5 1.0 }	position = { 1 0.5 }	}
	}
}

CPL = {	# Congress Poland royal standard

	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "red"

	sub = {
		parent = "sub_RUS_crown"
		instance = { scale = { 0.4 0.4 }	offset = { 0.3 0.05 }	}
	}
	sub = {
		parent = "sub_RUS_coa"
		instance = { scale = { 0.9 0.9 }	offset = { 0.05 0.075 }	}
	}
	sub = {
		parent = "sub_CPL_RUS"
		instance = { scale = { 0.45 0.45 }	offset = { 0.275 0.25 }	}
	}
}

CRL = {	#Courland
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
	}
}
CRL_russian = {
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "blue"
	color3 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
}

DEI = {	# Dutch East Indies
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[3/12] }	}
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[9/12] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "blue"
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[5/12] }	}
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[11/12] }	}
	}
}

DEI_subject = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[3/12] }	}
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[9/12] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "blue"
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[5/12] }	}
		instance = { scale = { 1.0 @[1/6] }	position = { 0.5 @[11/12] }	}
	}
}

DEI_voc = {	#Dutch East India, Company Flag, Unused
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "blue"
	}
	colored_emblem = {
		texture = "ce_letter_v_serif.dds"
		color1 = "black"
		instance = { scale = { 0.5 0.5 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_letter_o_serif.dds"
		color1 = "black"
		instance = { scale = { 0.25 0.21 }	position = { 0.46 0.46 }	rotation = -10	}
	}
	colored_emblem = {
		texture = "ce_letter_c_serif.dds"
		color1 = "black"
		instance = { scale = { 0.21 0.21 }	position = { 0.55 0.46 }	}
	}
}



EST_russian = {	# Estonia
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "purple"
	color3 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
}

GEA = {	# German East Africa Company
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "black"

	colored_emblem = {
		texture = "ce_cross_england.dds"
		color1 = color2
		color2 = color2
	}
	sub = {
		parent = "sub_GEA_canton"
		instance = { scale = { 0.45 0.42 }	offset = { 0 0 }	}
	}
}

GER_colony = {	# German Colonial Flag
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "white"
	color3 = "red"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 1.0 1.0 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_eagle.dds"
		color1 = "black"
		color2 = "red"
		color3 = "red"
		instance = { scale = { 0.55 0.55 }	position = { 0.5 0.54 }	}
	}
	colored_emblem = {
		texture = "ce_shield_iberian.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.15 0.15 }	position = { 0.5 0.535 }	}
	}
	colored_emblem = {
		texture = "ce_eagle.dds"
		color1 = "black"
		color2 = "red"
		color3 = "red"
		instance = { scale = { 0.13 0.13 }	position = { 0.5 0.54 }	}
	}
	textured_emblem = {
		texture = "te_german_state_crown.dds"
		instance = { scale = { 0.3 0.3 }	position = { 0.5 0.31 }	}
	}
}

GER_austrian = { # German Confederation
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "red"
	color3 = "yellow"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { @[4/15] @[2/5] }	position = { @[0.95/7]	@[1/5] }	}
	}
	colored_emblem = {
		texture = "ce_eagle_double_headed.dds"
		color1 = "black"
		color2 = "yellow_dark"
		color3 = "white"
		instance = { scale = { 0.48 0.48 }	position = { @[0.95/7] @[1/5] }	}
	}
	colored_emblem = {
		texture = "ce_eagle_doubleheaded_tongues.dds"
		color1 = "red"
		color2 = "red"
		color3 = "red"
		instance = { scale = { 0.48 0.48 }	position = { @[0.95/7] @[1/5] }	}
	}
}

GRA = {
	pattern = "pattern_solid.tga"
	color1 = "black"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "red"
		color2 = "yellow"
	}
}

GRZ = {
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "red"
	color3 = "yellow"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
}

GWE = {	#German West Africa Company/Deutsch West Afrika Gesellschaft
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "black_light"
	color3 = "red"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = color2
		instance = { scale = { 1.0 @[2/6] }	position = { 0.5 0.5 }	}
		instance = { scale = { @[2/9] 1.0 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = color1
		instance = { scale = { 1.0 @[2/8] }	position = { 0.5 0.5 }	}
		instance = { scale = { @[2/12] 1.0 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = color3
		instance = { scale = { 1.0 @[1/8] }	position = { 0.5 0.5 }	}
		instance = { scale = { @[1/12] 1.0 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = color3
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "yellow"
		instance = { scale = { 0.67 0.67 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_eagle.dds"
		color1 = color2
		color2 = color2
		color3 = color2
		instance = { scale = { 0.4 0.4 }	position = { 0.5 0.51 }	}
	}
}

HHN = {
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "black"

	colored_emblem = {
		texture = "ce_stripes_06.dds"
		color1 = "white"
		color2 = "white"
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.5 0.5 }	position = { 0.25 0.25 }	}
	}
	colored_emblem = {
		texture = "ce_eagle_legless.dds"
		color1 = "black"
		color2 = "yellow"
		color3 = "white"
		instance = { scale = { 0.65 0.65 }	position = { 0.25 0.3 }	}
	}
	colored_emblem = {
		texture = "ce_crown_simple.dds"
		color1 = "yellow"
		color2 = "yellow"
		color3 = "green"
		instance = { scale = { 0.12 0.12 }	position = { 0.26 0.08 }	}
	}
	colored_emblem = {
		texture = "ce_eagle_claws.dds"
		color1 = "yellow"
		color2 = "blue"
		color3 = "blue"
		instance = { scale = { 0.65 0.65 }	position = { 0.25 0.3 }	}
	}
}

IAC = {	# Imperial Africa Company
	pattern = "pattern_solid.tga"
	color1 = "white"

	sub = {
		parent = "sub_IAC_coa"
		instance = { scale = { 1.0 1.0 }	offset = { 0 0 }	}
	}
}

IAC_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	sub = {
		parent = "sub_IAC_coa"
		instance = { scale = { 1.0 0.5 }	offset = { 0.5 0.25 }	}
	}
}

IAC_british = {

	pattern = "pattern_gironny_8.dds"
	color1 = "blue"
	color2 = "blue"
	color3 = "white"
	color4 = "red"

	colored_emblem = {
		texture = "ce_saltire.dds"
		color1 = color3
		color2 = color3
	}
	colored_emblem = {
		texture = "ce_saltire_fimbriated.dds"
		color1 = color3
		color2 = color4
		mask = { 2 }
	}
	colored_emblem = {
		texture = "ce_cross_england_fimbriated.dds"
		color1 = color3
		color2 = color4
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.77 0.77 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.75 0.75 }	position = { 0.5 0.5 }	}
	}
	sub = {
		parent = "sub_IAC_coa"
		instance = { scale = { 0.5 0.5 }	offset = { 0.25 0.25 }	}
	}
}

IMG = { 
	pattern = "pattern_border_of_4.dds"
	color1 = "blue"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_soyombo_modern.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
}

ITA = { # Italy
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}
	textured_emblem = {
		texture = "te_coa_italia.dds"
		instance = { scale = { 0.7 0.7 }	position = { 0.5 0.62 }	}
	}	
	colored_emblem = {
		texture = "ce_crown_simple.dds"
		color1 = "yellow"
		color2 = "yellow"
		color3 = "yellow"
		instance = { scale = { 0.55 0.55 }	position = { 0.5 0.25 }	}
	}	
}
ITA_sicilian = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}
	textured_emblem = {
		texture = "te_necklace_two_sicilies.dds"
		instance = { scale = { 0.75 0.75 } position = { 0.5 0.50 } }
	}	
	textured_emblem = {
		texture = "te_crown.dds"
		instance = { scale = { 0.375 0.375 } position = { 0.5 0.30 } }
	}	
	textured_emblem = {
		texture = "te_coa_two_sicilies.dds"
		instance = { scale = { 0.5 0.5 } position = { 0.5 0.50 } }
	}			
}
ITA_papal = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "yellow"
	}
	textured_emblem = {
		texture = "te_coa_papal_states_tiara.dds"
		instance = { scale = { 0.85 0.85 } position = { 0.5 0.5 } }
	}					
}
ITA_republic = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}		
}
ITA_dictatorship = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}			
	textured_emblem = {
		texture = "te_italy_navy.dds"
		instance = { scale = { 0.6 0.6 }	position = { 0.5 0.5 }	}
	}
}
ITA_communist = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}	
	colored_emblem = {
		texture = "ce_frame_star.dds"
		color1 = "red_light"
		color2 = "yellow"
		instance = { scale = { 0.3 0.3 } position = { 0.5 0.5 } } 
	}	
}
ITA_fascist = {		
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}
    sub = {
        parent = "sub_ITA_eagle" 
        instance = { scale = { 1.0 1.0 } }
    }		
}
ITA_tuscan = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}
	textured_emblem = {
		texture = "te_tuscan_italy.dds"
		instance = { scale = { 0.6 0.6 }	position = { 0.5 0.5 }	}
	}	
}

UPC = { 
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red"
	}
	textured_emblem = {
		texture = "te_coa_italia.dds"
		instance = { scale = { 0.7 0.7 }	position = { 0.5 0.5 }	}
	}	
}

JAP_communist = {
	pattern = "pattern_solid.tga"
	color1 = "red_light"
	color2 = "grey_observer"
	color3 = "yellow"

	colored_emblem = {
		texture = "ce_jap_communist.dds"
		color1 = color2
		color2 = color3
	}
}

KAA = {	# Kauai, Fictional Design based on flagblog post in 2012
	pattern = "pattern_solid.tga"
	color1 = "purple"

	colored_emblem = {
		texture = "ce_stripes_09.dds"
		color1 = "white"
	}
}

KED = {	# Kedah
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_shield_heater.dds"
		color1 = "yellow"
		instance = { scale = { 0.23 0.24 }	position = { 0.2 0.2 }	}
	}
	colored_emblem = {
		texture = "ce_bend_sinister.dds"
		color1 = "white"
		instance = { scale = { 0.3 0.2 }	position = { 0.2 0.19 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		instance = { scale = { 0.29 0.3 }	position = { 0.01 0.175 }	}
		instance = { scale = { 0.29 0.3 }	position = { 0.391 0.175 }	}
	}
	colored_emblem = {
		texture = "ce_laurel_circled.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.45 0.45 }	position = { 0.2 0.23 }	}
	}
	colored_emblem = {
		texture = "ce_crescent_pale.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 0.2 0.2 }	position = { 0.2 0.275 }	}
		instance = { scale = { 0.2 0.18 }	position = { 0.2 0.27 }	}
	}
}

KNY = {
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "black"
	color3 = "red"
	color4 = "green"

	colored_emblem = {
		texture = "ce_tricolor_fimbriated_thin.dds"
		color1 = color2
		color2 = color3
		color3 = color4
	}
	colored_emblem = {
		texture = "ce_kenya_shield.dds"
		color1 = "red"
		color2 = "white"
		color3 = "black"
		instance = { scale = { 0.8 0.8 }	}
	}

}

KNY_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		instance = { scale = { 0.85 0.85 }	position = { 0.75 0.5}	}
	}
	colored_emblem = {
		texture = "ce_lion_rampant_guardant.dds"
		color1 = "red_light"
		color2 = "red"
		color3 = "white"
		instance = { scale = { 0.45 0.45 }	position = { 0.75 0.5}	}
	}
}

KOR_empire = { 
	# 1882 flag adopted at end of isolationist era
	
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "blue"

	colored_emblem = {
		texture = "ce_korea_taegeuk.dds"
		color1 = "red"
		color2 = hsv360 { 253 80 44	}
        instance = { position = { 0.5 0.5 }	scale = { 1.0 1.0 }	}		
	}
	colored_emblem = {
		texture = "ce_korea_kwae.dds"
		color1 = hsv360 { 253 80 44	}
        instance = { position = { 0.5 0.5 }	scale = { 0.9 0.9 }	}		
	}	
}
KOR_tributary = {
	# joseon royal standard 

	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "yellow"
	colored_emblem = {
		texture = "ce_border_thin_4.dds"
		color2 = "yellow"
        instance = { position = { 0.5 0.5 }	scale = { 1.0 1.0 }	}		
	}
	colored_emblem = {
		texture = "ce_korea_taegeuk_royal.dds"
		color1 = "white"
		color2 = "yellow"
        instance = { position = { 0.5 0.5 }	scale = { 1.0 1.0 }	}		
	}	
	colored_emblem = {
		texture = "ce_korea_kwae_8.dds"
		color1 = "yellow"
		color2 = "yellow"
        instance = { position = { 0.5 0.5 }	scale = { 0.9 0.9 }	}		
	}		
}
KOR_republic = {
	# modern flag of republic of korea (south korea)

	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "blue"
	colored_emblem = {
		texture = "ce_korea_taegeuk_modern.dds"
		color1 = "blue"
		color2 = "red"
        instance = { position = { 0.5 0.5 }	scale = { 0.36 0.52 }	}		
	}
	colored_emblem = {
		texture = "ce_korea_kwae_modern.dds"
		color1 = "black"
		color2 = "black"
        instance = { position = { 0.5 0.5 }	scale = { 1.1 1.1 }	}		
	}	
}
KOR_fascist = {
	# korean fascist flag

	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "blue"
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
        instance = { position = { 0.25 0.68 }	scale = { 0.5 0.4 }}		
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
        instance = { position = { 0.25 0.60 }	scale = { 0.5 0.08 }}		
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
        instance = { position = { 0.25 0.78 }	scale = { 0.5 0.08 }}		
	}	
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
        instance = { position = { 0.75 0.32 }	scale = { 0.5 0.4 }}		
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
        instance = { position = { 0.75 0.24 }	scale = { 0.5 0.08 }}		
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
        instance = { position = { 0.75 0.40 }	scale = { 0.5 0.08 }}		
	}	
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
        instance = { position = { 0.5 0.5 }	scale = { 1.3 1.3 }}	
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "black"
        instance = { position = { 0.5 0.5 }	scale = { 1.2 1.2   }}			
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
        instance = { position = { 0.5 0.5 }	scale = { 1.15 1.15 }}	
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "black"
        instance = { position = { 0.5 0.42 }	scale = { 0.15 0.15 }}	
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "black"
        instance = { position = { 0.55 0.55 }	scale = { 0.15 0.15 }}	
	}
	colored_emblem = {
		texture = "ce_star_05.dds" 
		color1 = "black"
        instance = { position = { 0.45 0.55 }	scale = { 0.15 0.15 }}	
	}
	colored_emblem = { 
		texture = "ce_korea_taeguk_fascist.dds"
		color1 = "red"
		color2 = "blue"
        instance = { position = { 0.5 0.5 }	scale = { 1.0 1.0 }	}		
	}	
}
KOR_subject = { 
	pattern = "pattern_solid.tga"
	color1 = "blue"
	color2 = "white"
	color3 = "red"

	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = color2
		color2 = color2
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_korea_taegeuk.dds"
		color1 = "red_light"
		color2 = "azure"
        instance = { position = { 0.75 0.5 }	scale = { 0.65 0.65 }	}		
	}
}
KOR_subject_CHI = {
	# Before 1882 flags with chinese dragons
	# Earliest attested so historical flag at start
	
	pattern = "pattern_border_of_3.dds"
	color1 = "yellow"
	color2 = "red"
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 0.125 0.125 }	position = { 0.11 0.205 }	}		
	}	
	colored_emblem = {
		texture = "ce_dragon_china.dds"
		color1 = "black"
		color2 = "white"
		color3 = "red"
		instance = { scale = { 1.2 1.2 }	position = { 0.45 0.49 }	}			
	}
}
KOR_north = {
	#modern flag of democratic people's republic of korea (north korea)

	pattern = "pattern_solid.tga"
	color1 = "blue"
	
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { position = { 0.5 0.5 }	scale = { 1 0.70 }	}
	}			
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"		
		instance = { position = { 0.5 0.5 }	scale = { 1.0 0.60 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { position = { 0.33 0.5 }	scale = { 0.5 0.5 }	}
	}	
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "red"
		color2 = "red"
		instance = { position = { 0.33 0.5 }	scale = { 0.45 0.45 }	}
	}
}
KOR_communist = {
	#people's republic of korea flag

	pattern = "pattern_solid.tga"
	color1 = "white"
	
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		instance = { position = { 0.5 0.5 }	scale = { 1.0 0.40 }	}
	}			
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"		
		instance = { position = { 0.5 0.43 }	scale = { 1.0 0.05 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"		
		instance = { position = { 0.5 0.57 }	scale = { 1.0 0.05 }	}
	}
	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		instance = { position = { 0.4 0.5 }	scale = { 1.0 1.0 }	}
	}
	colored_emblem = {
		texture = "ce_korea_taegeuk_modern.dds"
		color1 = "red"
		color2 = hsv360 { 253 80 44	}
        instance = { position = { 0.4 0.5 }	scale = { 0.35 0.5 }	rotation = 90 }		
	}
}

KUM = { 
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_soyombo_flame.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.3 0.3 }	position = { 0.5 0.15 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle_outline.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.45 0.45 }	position = { 0.59 0.6 }	}
		instance = { scale = { 0.45 0.45 }	position = { 0.41 0.6 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.1 0.1 }	position = { 0.59 0.33 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.41 0.33 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.59 0.6 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.41 0.6 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.77 0.6 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.23 0.6 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.59 0.87 }	}
		instance = { scale = { 0.1 0.1 }	position = { 0.41 0.87 }	}
	}
}

LAB = {	#Labrador
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "green"
		color2 = "blue_light"
	}
}

LAT_subject = {
	pattern = "pattern_solid.tga"
	color1 = "green_light"
	color2 = "azure"
	color3 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
}

LAU = {
	pattern = "pattern_solid.tga"
	color1 = "black"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "yellow"
		color2 = "yellow"
	}
}

LBG = {

	pattern = "pattern_solid.tga"
	color1 = "yellow"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "green"
	}
}

LIE = {	#Liechtenstein 1836-1921
	pattern = "pattern_solid.tga"
	color1 = "yellow"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "red"
	}
}

LIE2 = {	#Liechtenstein 1852-1921
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_bicolor_right.dds"
		color1 = "blue"
	}
}

LIE3 = {	#Liechtenstein 1921-1936
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "red"
	}
}

LUW = {	# Luwu
	pattern = "pattern_solid.tga"
	color1 = "white"
	color2 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { @[5/6] @[3/4] }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_lion_statant_guardant.dds"
		color1 = "white"
		color2 = "white"
		color3 = "black"
		instance = { scale = { 1.3 0.8 }	position = { 0.5 0.5 }	}
	}
}

LVN = {	# Livonia
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal_fifth.dds"
		color1 = "white"
		color2 = "blue"
	}
}
LVN_russian = {
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "green"
	color3 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = color2
		color2 = color3
	}
}

MCH_qing = {
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_dragon_china_circle.dds"
		color1 = "blue"
		color2 = "white"
		color3 = "blue_light"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 0.13 0.13 }	position = { 0.5 0.5 }	}
	}
}

MIN = {	# Mingrelia
	pattern = "pattern_solid.tga"
	color1 = "blue_light"
	color2 = "red_light"

	colored_emblem = {
		texture = "ce_cross_england.dds"
		color1 = color2
		color2 = color2
	}
}

MLN = {	# Milan
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}
	colored_emblem = {
		texture = "ce_coa_italia_libera.dds"
		color1 = "black"
		instance = { scale = { 0.55 0.55 }	position = { 0.5 0.5 }	 }
	}
}

NEU = {
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { @[1/3] 1.0 }	position = { @[1/6] 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_sol_de_mayo.dds"
		color1 = "yellow"
		color2 = "white"
		instance = { scale = { 0.5 0.5 }	position = { @[1/6] 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_star_05.dds"
		color1 = "yellow"
		color2 = "white"
		instance = { scale = { 0.09 0.09 }	position = { 0.06 0.27 }	}
		instance = { scale = { 0.09 0.09 }	position = { 0.27 0.27 }	}
	}
	colored_emblem = {
		texture = "ce_star_05_tilted.dds"
		color1 = "yellow"
		color2 = "white"
		instance = { scale = { -0.09 0.09 }	position = { 0.127 0.23 }	}
		instance = { scale = { 0.09 0.09 }	position = { 0.203 0.23 }	}
	}
}

NGR = {	# Nigeria
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "green"
	}
}

NGR_subject = {	# Nigeria
	pattern = "pattern_solid.tga"
	color1 = "blue" 

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "red"
		instance = { scale = { 0.85 0.85 }	position = { 0.75 0.5}	}
	}
	colored_emblem = {
		texture = "ce_star_hexagram.dds"
		color1 = "green"
		instance = { scale = { 0.6 0.6 }	position = { 0.75 0.5}	}
	}
	colored_emblem = {
		texture = "ce_crown_tudor.dds"
		color1 = "yellow"
		color2 = "red"
		color3 = "white"
		instance = { scale = { 0.15 0.15 }	position = { 0.75 0.5}	}
	}
}

NWT = {	#Northwest Territories
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "blue"
	}
}

NWT_subject = {	#Northwest Territories
	pattern = "pattern_solid.tga"
	color1 = "red"
	sub = {
		parent = "sub_NWT"
		instance = { scale = { 0.5 0.5 }	offset = { 0.5 0.25 }	}
	}
}

OMG = { 
	pattern = "pattern_border_of_4.dds"
	color1 = "red"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_soyombo_modern.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
}

PER_qajar = {
	pattern = "pattern_solid.tga"
	color1 = "white"


	colored_emblem = {
		texture = "ce_inti.dds"
		color1 = "yellow"
		color2 = "orange"
		color3 = "white"
		instance = { scale = { 0.60 0.60 }	position = { 0.51 0.42 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.4 0.2 }	position = { 0.5 0.65 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.16 0.16 }	position = { 0.51 0.42 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "yellow_dark"
		color2 = "yellow_dark"
		instance = { scale = { 0.5 0.02 }	position = { 0.525 0.81 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.49 0.01 }	position = { 0.525 0.805 }	}
	}
	colored_emblem = {
		texture = "ce_lion_persia.dds"
		color1 = "yellow"
		color2 = "yellow"
		color3 = "yellow_light"
		instance = { scale = { 1.1 1.1 }	position = { 0.5 0.5 }	}
	}
}

POS = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
	}
}
POS_subject_PRU = {
	# flag of the Provinz Posen with coat of arms
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "black"
		color2 = "white"
	}
	colored_emblem = {
		texture = "ce_shield_iberian.dds"
		color1 = "black"
		instance = { scale = { 1.0 0.90 }	position = { 0.5 0.48 }	}
	}
	colored_emblem = {
		texture = "ce_shield_iberian.dds"
		color1 = "white"
		instance = { scale = { 0.95 0.85 }	position = { 0.5 0.48 }	}
	}
	textured_emblem = {
		texture = "te_eagle_prussia_monogram_crown.dds"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.485 }	}
	}
	sub = {
		parent = "sub_POS_shield"
		instance = { scale = { 0.26 0.26 }	offset = { 0.37 0.34 }	}
	}
}

#vanilla flag switch
PRU = {	#Ürussa
	# Late 19th c. with stripes and changes to the eagle (scepter-sword, monogram, bone links)
	# Starting flag although PRU is the historical one (more convenient and still fits the gov type)

	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 1.0 0.18 }	position = { 0.5 0.09 }	}
		instance = { scale = { 1.0 0.18 }	position = { 0.5 0.91 }	}
	}
	textured_emblem	= {
		texture = "te_eagle_prussia_monogram_crown.dds"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.485 }	}
	}
}
PRU_absolute_monarchy = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_eagle_prussia.dds"
		color1 = "black"
		color2 = "yellow"
		color3 = "pearl"
		instance = { scale = { 1.0 1.0 }	position = { 0.5 0.5 }	}
	}
	textured_emblem = {
		texture = "te_crown_cut.dds"
		instance = { scale = { 0.15 0.20 }	position = { 0.52 0.195 }	rotation = 12 }
	}
}

PTT = {	# Pattani
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 1.0 1.0 }	position = { 0.5 0.5 }	}
	}
}

QIN = { 
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "red"

	colored_emblem = {
		texture = "ce_crescent_star_05_rotated.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 0.8 0.8 }	position = { 0.3 0.6 }	}
	}
}
QIN_qing = { 
	pattern = "pattern_solid.tga"
	color1 = "yellow"
	color2 = "yellow"

	colored_emblem = {
		texture = "ce_bicolor_left_third.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.1 1.0 }	position = { 0.75 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_frame_circle_triangles.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.7 0.7 }	position = { 0.4 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_crescent_star_05_rotated.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.5 0.5 }	position = { 0.4 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_qinghai_character.dds"
		color1 = "black"
		color2 = "black"
		instance = { scale = { 0.6 0.7 }	position = { 0.85 0.5 }	}
	}
}

RAC = {	#Russian America Company (Alaska)
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "blue"
		color2 = "blue"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.625 }	}
	}

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.875 }	}
	}

	sub = {
		parent = "sub_RUS_crown"
		instance = { scale = { 0.2 0.2 }	offset = { 0.182 0.01 }	}
	}
	sub = {
		parent = "sub_RAC_coa"
		instance = { scale = { 0.57 0.57 }	offset = { 0 0.0 }	}
	}
}

REF = {
	pattern = "pattern_solid.tga"
	color1 = "yellow"
}

KLE = {
    sub = {
        parent = "sub_TRN" 
    }
}

WNH = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "white"
		color2 = "blue"
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "green"
		color2 = "green"
		instance = { scale = { 0.25 1.0 } position = { 0.875 0.5 } }
	}
}

RIA = {	# Riau Lingga
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_border_of_3_sikkim.dds"
		color1 = "yellow"
		color2 = "green"
		color3 = "green"
		instance = { scale = { -1.0 1.0 }	position = { 0.5 0.5 }	}
	}
}

RGT = {
	pattern = "pattern_solid.tga"
	color1 = "red"
	color2 = "white"
	color3 = yellow

	colored_emblem = {
		texture = "ce_cross_denmark.dds"
		color1 = color2
		color2 = color2
	}

	colored_emblem = {
		texture = "ce_crossed_arrows.dds"
		color1 = color3
		color2 = color3
		instance = { scale = { 0.6 0.6 }	position = { 0.15 0.21 }	}
	}
		colored_emblem = {
		texture = "ce_letter_k.dds"
		color1 = color3
		color2 = color3
		instance = { scale = { 0.23 0.23 }	position = { 0.25 0.5 }	}
	}
		colored_emblem = {
		texture = "ce_letter_G.dds"
		color1 = color3
		color2 = color3
		instance = { scale = { 0.23 0.23 }	position = { 0.33 0.5 }	}
	}
		colored_emblem = {
		texture = "ce_letter_H.dds"
		color1 = color3
		color2 = color3
		instance = { scale = { 0.23 0.23 }	position = { 0.415 0.5 }	}
	}
}

RHO = {
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "white"
	color3 = "green"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = color2
		color2 = color3
	}

	textured_emblem = {
		texture = "te_coa_rhodesia.dds"
		instance = { scale = { 0.45 0.45 }	position = { 0.5 0.5 }	}
	}
}

RHO_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	textured_emblem = {
		texture = "te_coa_south_rhodesia.dds"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

RMR = {	# Roman Republic
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red"
	}

	colored_emblem = {
		texture = "ce_coa_roman_republic.dds"
		color1 = "red_light"
		instance = { scale = { 0.58 0.58 }	position = { 0.5 0.5 }	 }
	}
}

RNC = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "red"
		color2 = "red"
		instance = { scale = { 1.2 1.2 }	position = { 0.5 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
		instance = { scale = { 1 1 }	position = { 0.5 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_niger_company.dds"
		color1 = "black"
		 color2 = "yellow"
		instance = { scale = { 0.8 0.8 }	position = { 0.5 0.5 }	}
	}
}

RNC_subject = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "red"
		color2 = "red"
	instance = { scale = { 0.85 0.85 }	position = { 0.75 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_circle.dds"
		color1 = "white"
		color2 = "white"
	instance = { scale = { 0.7 0.7 }	position = { 0.75 0.5 }	}
	}

	colored_emblem = {
		texture = "ce_niger_company.dds"
		color1 = "black"
		 color2 = "yellow"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

RYU = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_ryuku.dds"
		color1 = "black"
		color2 = rgb { 90 90 200}
		instance = { scale = { 1.1 1.1 }	position = { 0.5 @[2/6] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "black"
		instance = { scale = { 1.0 @[3/9] }	position = { 0.5 @[5/6] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red"
		instance = { scale = { 1.0 @[1/9] }	position = { 0.5 @[5/6] }	}
	}
}

SCL = {	# Sicily
	pattern = "pattern_solid.tga"
	color1 = "green"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red"
	}

	textured_emblem = {
		texture = "te_coa_sicily.dds"
		instance = { scale = { 0.6 0.6 }	position = { 0.5 0.5 }	 }
	}
}

SIC_naples_republic = {	# Two Sicilies
	pattern = "pattern_solid.tga"
	color1 = "sapphire"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "yellow_light"
		color2 = "red"
	}
}

SMR = {	# Republic of San Marco
	pattern = "pattern_solid.tga"
	color1 = "green_light"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { 0.34 @[1/3] }	position = { @[1/6] @[1/6] }	}
	}
	colored_emblem = {
		texture = "ce_stripes_08_diagonal.dds"
		color1 = "red_light"
		color2 = "green_light"
		instance = { scale = { 0.34 0.34 }	position = { @[1/6] @[1/6] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { 0.28 0.28 }	position = { @[1/6] @[1/6] }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "green_light"
		instance = { scale = { 1.0 @[2/3] }	position = { @[1/6] @[2/3] }	}
	}
	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "red_light"
	}

	textured_emblem = {
		texture = "te_lion_san_marco.dds"
		instance = { scale = { 0.4 0.4 }	position = { 0.17 0.18 }	 }
	}
}

SND = {
	pattern = "pattern_solid.tga"
	color1 = "blue_light"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "white"
		color2 = "white"
	}
}

TAN = {
	pattern = "pattern_solid.tga"
	color1 = "yellow"
	color2 = "green"
	color3 = "black"
	color4 = "green"

	colored_emblem = {
		texture = "ce_tricolor_fimbriated_thin.dds"
		color1 = color2
		color2 = color3
		color3 = color4
	}

}

TAN_subject = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	textured_emblem = {
		texture = "te_coa_tanganyika.dds"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

TZN = {
	pattern = "pattern_solid.tga"
	color1 = "green"
	color2 = "yellow"
	color3 = "black"


	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "blue_light"

		instance = { scale = { 1.5 1.5 }	position = { 0.5 0.7 }	rotation = -45}
	}

	colored_emblem = {
		texture = "ce_bend_sinister_fimbriated.dds"
		color1 = color2
		color2 = color3
	}


}

TLI = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.125 }	}
	}
	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { scale = { 1.0 0.25 }	position = { 0.5 0.875 }	}
	}

	textured_emblem = {
		texture = "te_coa_tli.dds"
		instance = { scale = { 1 1 }	position = { 0.5 0.5 }	}
	}
}

TRG = {	# Terengganu
	pattern = "pattern_solid.tga"
	color1 = "black"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "white"
		instance = { scale = { @[1/3] 1 }	position = { @[1/6] 0.5 }	}
	}
}

TRH_subject = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "blue"
		color2 = "red"
	}

	textured_emblem = {
		texture = "te_coa_turkestan.dds"
		instance = { scale = { 1 1 }	position = { 0.5 0.5 }	}
	}
}
TRH_subject_RUS = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_tricolor_horizontal.dds"
		color1 = "blue"
		color2 = "red"
	}
	colored_emblem = {
		texture = "ce_shield_accolade.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.9 0.9 }	position = { 0.5 0.5 }	}
	}
	colored_emblem = {
		texture = "ce_unicorn_1.dds"
		color1 = "black"
		color2 = "red"
		color3 = "red"
		instance = { scale = { 0.6 0.6 }	position = { 0.5 0.5 }	}
	}
}
TUV = {
	pattern = "pattern_solid.tga"
	color1 = "blue_light"

	colored_emblem = {
		texture = "ce_tuva_wheel.dds"
		color1 = "yellow"
		color2 = "white"
		color3 = "black"
		instance = { scale = { 0.6 0.6 }	position = { 0.5 0.5 }	}
	}
}

UCO = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_star_13.dds"
		color1 = "yellow"
		instance = { scale = { 0.4 0.4 }	position = { 0.15 0.2 }	}
	}
}

URU_civil_war = {
	pattern = "pattern_solid.tga"
	color1 = "white"

	colored_emblem = {
		texture = "ce_bicolor_bottom.dds"
		color1 = "blue_light"
		color2 = "blue_light"
	}
}

UGA = {
	pattern = "pattern_solid.tga"
	color1 = "black"
	color2 = "yellow"
	color3 = "red"

	colored_emblem = {
		texture = "ce_tricolor_doubled.dds"
		color1 = color1
		color2 = color2
		color3 = color3
	}

	textured_emblem = {
		texture = "te_coa_uganda.dds"
		instance = { scale = { 0.35 0.35 }	position = { 0.5 0.5 }	}
	}

}

UGA_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	textured_emblem = {
		texture = "te_coa_uganda_colony.dds"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

ZAM = {
	pattern = "pattern_solid.tga"
	color1 = "green"


	colored_emblem = {
		texture = "ce_tricolor_doubled.dds"
		color1 = "orange"
		color2 = "black"
		color3 = "red"

		instance = { scale = { 0.65 0.75 }	position = { 1	0.75 }	rotation = 90 }
	}

	colored_emblem = {
		texture = "ce_zambia_eagle.dds"
		color1 = "orange"
		color2 = "black"

		instance = { scale = { 0.4 0.4 }	position = { 0.825	0.2 }	}
	}
}

ZAM_subject = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	textured_emblem = {
		texture = "te_coa_north_rhodesia.dds"
		instance = { scale = { 0.5 0.5 }	position = { 0.75 0.5 }	}
	}
}

FRA_radical_republic = {
	pattern = "pattern_solid.tga"
	color1 = "red"

	colored_emblem = {
		texture = "ce_tricolor_vertical.dds"
		color1 = "white"
		color2 = "blue"
	}
}

SAR = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { position = { 0.25 0.25 } scale = { 0.5 0.5 } }
	}
	colored_emblem = {
		texture = "ce_cross_sardinia.dds"
		color1 = "white"
		color2 = "red_light"
		instance = { position = { 0.25 0.25 } scale = { 0.5 0.5 } }
	}
	textured_emblem = {
		texture = "te_crown.dds"
		instance = { scale = { 0.17 0.17 } position = { 0.25 0.050 } }
	}	
}

SAR_republic = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { position = { 0.25 0.25 } scale = { 0.5 0.5 } }
	}
	colored_emblem = {
		texture = "ce_cross_sardinia.dds"
		color1 = "white"
		color2 = "red_light"
		instance = { position = { 0.25 0.25 } scale = { 0.5 0.5 } }
	}
}

SAR_canton = {
	pattern = "pattern_solid.tga"
	color1 = "red_light"

	colored_emblem = {
		texture = "ce_cross_sardinia.dds"
		color1 = "white"
		color2 = "red_light"
		instance = { position = { 0.5 0.5 } scale = { 1.0 1.0 } }
	}
}

SAR_communist = {
	pattern = "pattern_solid.tga"
	color1 = "blue"

	colored_emblem = {
		texture = "ce_solid.dds"
		color1 = "red_light"
		color2 = "red_light"
		instance = { scale = { @[0.25*1.5] 0.5 } position = { @[0.25*1.5/2] 0.25 } }
	}
	colored_emblem = {
		texture = "ce_hammer_sickle_italy.dds"
		color1 = "yellow"
		color2 = "yellow"
		instance = { scale = { 0.45 0.45 } position = { 0.17 0.24 } } 
	}	
}

SAR_subject = {
	# Based on royal standard
	pattern = "pattern_border_of_4.dds"
	color1 = "white"
	color2 = "blue"
		
	textured_emblem = {
		texture = "te_crown.dds"
		instance = { scale = { 0.36 0.36 } position = { 0.75 0.300 } }
	}
	colored_emblem = {
		texture = "ce_shield_cross.dds"
		color1 = "black"
		color2 = "black"
		color3 = "black"
		instance = { scale = { 0.46 0.46 } position = { 0.75 0.54 } }
	}		
	colored_emblem = {
		texture = "ce_shield_cross.dds"
		color1 = "red_light"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.45 0.45 } position = { 0.75 0.54 } }
	}	
}

SAR_subject_GBR = {
	pattern = "pattern_border_of_4.dds"
	color1 = "blue"
	color2 = "red_light"
		
	textured_emblem = {
		texture = "te_crown.dds"
		instance = { scale = { 0.36 0.36 } position = { 0.75 0.300 } }
	}
	colored_emblem = {
		texture = "ce_shield_cross.dds"
		color1 = "red_light"
		color2 = "white"
		color3 = "white"
		instance = { scale = { 0.45 0.45 } position = { 0.75 0.54 } }
	}	
}